﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ForzaGT3.Data;

namespace ForzaGT3.Controllers
{
    public partial class ResultsController : Controller
    {
        //
        // GET: /Results/

        public virtual ActionResult Index(Guid? SeriesId)
        {
            IEnumerable<Result> data = Result.GetAll();

            if (SeriesId.HasValue)
            {
                data = data.Where(x => x.SeriesId == SeriesId);
            }

            return View(data);
        }

    }
}
